// 正则表达式
const RE = {

    usernameCheck (str) {
        // 首位一定要用字母，长度一共是1-12位
        const usernameRE = /^[a-zA-Z][a-zA-Z0-9]{1,11}$/
        return usernameRE.test(str) 
    },
    
    passwordCheck (str) {
        const passwordRE = /^[a-zA-Z0-9]{6,20}$/
        return passwordRE.test(str)
    },

    verificationCheck (str) {
        const verificationRE = /^[a-zA-Z0-9]{8}$/
        return verificationRE.test(str)
    },

    emailCheck (str) {
        const emailRE = /^\w+@\w+(\.\w+)+$/
        return emailRE.test(str)
    },
   
    
}


export default RE